Optimal. Leaf size=117 \[ \frac {(a+b)^{7/2} \tan ^{-1}\left (\frac {\sqrt {a+b} \tan (c+d x)}{\sqrt {a}}\right )}{a^{9/2} d}+\frac {(a+b)^3 \cot (c+d x)}{a^4 d}-\frac {(a+b)^2 \cot ^3(c+d x)}{3 a^3 d}+\frac {(a+b) \cot ^5(c+d x)}{5 a^2 d}-\frac {\cot ^7(c+d x)}{7 a d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.08, antiderivative size = 117, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {3274, 331, 211}
\begin {gather*} \frac {(a+b)^{7/2} \text {ArcTan}\left (\frac {\sqrt {a+b} \tan (c+d x)}{\sqrt {a}}\right )}{a^{9/2} d}+\frac {(a+b)^3 \cot (c+d x)}{a^4 d}-\frac {(a+b)^2 \cot ^3(c+d x)}{3 a^3 d}+\frac {(a+b) \cot ^5(c+d x)}{5 a^2 d}-\frac {\cot ^7(c+d x)}{7 a d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 331
Rule 3274
Rubi steps
\begin {align*} \int \frac {\cot ^8(c+d x)}{a+b \sin ^2(c+d x)} \, dx &=\frac {\text {Subst}\left (\int \frac {1}{x^8 \left (a+(a+b) x^2\right )} \, dx,x,\tan (c+d x)\right )}{d}\\ &=-\frac {\cot ^7(c+d x)}{7 a d}-\frac {(a+b) \text {Subst}\left (\int \frac {1}{x^6 \left (a+(a+b) x^2\right )} \, dx,x,\tan (c+d x)\right )}{a d}\\ &=\frac {(a+b) \cot ^5(c+d x)}{5 a^2 d}-\frac {\cot ^7(c+d x)}{7 a d}+\frac {(a+b)^2 \text {Subst}\left (\int \frac {1}{x^4 \left (a+(a+b) x^2\right )} \, dx,x,\tan (c+d x)\right )}{a^2 d}\\ &=-\frac {(a+b)^2 \cot ^3(c+d x)}{3 a^3 d}+\frac {(a+b) \cot ^5(c+d x)}{5 a^2 d}-\frac {\cot ^7(c+d x)}{7 a d}-\frac {(a+b)^3 \text {Subst}\left (\int \frac {1}{x^2 \left (a+(a+b) x^2\right )} \, dx,x,\tan (c+d x)\right )}{a^3 d}\\ &=\frac {(a+b)^3 \cot (c+d x)}{a^4 d}-\frac {(a+b)^2 \cot ^3(c+d x)}{3 a^3 d}+\frac {(a+b) \cot ^5(c+d x)}{5 a^2 d}-\frac {\cot ^7(c+d x)}{7 a d}+\frac {(a+b)^4 \text {Subst}\left (\int \frac {1}{a+(a+b) x^2} \, dx,x,\tan (c+d x)\right )}{a^4 d}\\ &=\frac {(a+b)^{7/2} \tan ^{-1}\left (\frac {\sqrt {a+b} \tan (c+d x)}{\sqrt {a}}\right )}{a^{9/2} d}+\frac {(a+b)^3 \cot (c+d x)}{a^4 d}-\frac {(a+b)^2 \cot ^3(c+d x)}{3 a^3 d}+\frac {(a+b) \cot ^5(c+d x)}{5 a^2 d}-\frac {\cot ^7(c+d x)}{7 a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.76, size = 135, normalized size = 1.15 \begin {gather*} \frac {(a+b)^{7/2} \tan ^{-1}\left (\frac {\sqrt {a+b} \tan (c+d x)}{\sqrt {a}}\right )}{a^{9/2} d}+\frac {\cot (c+d x) \left (176 a^3+406 a^2 b+350 a b^2+105 b^3-a \left (122 a^2+112 a b+35 b^2\right ) \csc ^2(c+d x)+3 a^2 (22 a+7 b) \csc ^4(c+d x)-15 a^3 \csc ^6(c+d x)\right )}{105 a^4 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.65, size = 155, normalized size = 1.32
method | result | size |
derivativedivides | \(\frac {\frac {\left (a^{4}+4 a^{3} b +6 a^{2} b^{2}+4 a \,b^{3}+b^{4}\right ) \arctan \left (\frac {\tan \left (d x +c \right ) \left (a +b \right )}{\sqrt {a \left (a +b \right )}}\right )}{a^{4} \sqrt {a \left (a +b \right )}}-\frac {-a^{3}-3 a^{2} b -3 a \,b^{2}-b^{3}}{a^{4} \tan \left (d x +c \right )}-\frac {-a -b}{5 a^{2} \tan \left (d x +c \right )^{5}}-\frac {a^{2}+2 a b +b^{2}}{3 a^{3} \tan \left (d x +c \right )^{3}}-\frac {1}{7 a \tan \left (d x +c \right )^{7}}}{d}\) | \(155\) |
default | \(\frac {\frac {\left (a^{4}+4 a^{3} b +6 a^{2} b^{2}+4 a \,b^{3}+b^{4}\right ) \arctan \left (\frac {\tan \left (d x +c \right ) \left (a +b \right )}{\sqrt {a \left (a +b \right )}}\right )}{a^{4} \sqrt {a \left (a +b \right )}}-\frac {-a^{3}-3 a^{2} b -3 a \,b^{2}-b^{3}}{a^{4} \tan \left (d x +c \right )}-\frac {-a -b}{5 a^{2} \tan \left (d x +c \right )^{5}}-\frac {a^{2}+2 a b +b^{2}}{3 a^{3} \tan \left (d x +c \right )^{3}}-\frac {1}{7 a \tan \left (d x +c \right )^{7}}}{d}\) | \(155\) |
risch | \(\frac {2 i \left (-2212 b \,{\mathrm e}^{2 i \left (d x +c \right )} a^{2}+350 a \,b^{2}+105 b^{3}+176 a^{3}+406 a^{2} b +1575 b^{3} {\mathrm e}^{4 i \left (d x +c \right )}-630 b^{3} {\mathrm e}^{2 i \left (d x +c \right )}-6860 a \,b^{2} {\mathrm e}^{6 i \left (d x +c \right )}+5040 a \,b^{2} {\mathrm e}^{4 i \left (d x +c \right )}+5586 b \,{\mathrm e}^{4 i \left (d x +c \right )} a^{2}-2030 a \,b^{2} {\mathrm e}^{2 i \left (d x +c \right )}-2100 b^{3} {\mathrm e}^{6 i \left (d x +c \right )}-7840 b \,{\mathrm e}^{6 i \left (d x +c \right )} a^{2}-3080 a^{3} {\mathrm e}^{6 i \left (d x +c \right )}+2436 a^{3} {\mathrm e}^{4 i \left (d x +c \right )}-812 a^{3} {\mathrm e}^{2 i \left (d x +c \right )}-1260 a^{3} {\mathrm e}^{10 i \left (d x +c \right )}+420 a^{3} {\mathrm e}^{12 i \left (d x +c \right )}+630 a^{2} b \,{\mathrm e}^{12 i \left (d x +c \right )}+420 a \,b^{2} {\mathrm e}^{12 i \left (d x +c \right )}-2940 a^{2} b \,{\mathrm e}^{10 i \left (d x +c \right )}-2310 a \,b^{2} {\mathrm e}^{10 i \left (d x +c \right )}+6370 a^{2} b \,{\mathrm e}^{8 i \left (d x +c \right )}+5390 a \,b^{2} {\mathrm e}^{8 i \left (d x +c \right )}+105 b^{3} {\mathrm e}^{12 i \left (d x +c \right )}-630 b^{3} {\mathrm e}^{10 i \left (d x +c \right )}+3080 a^{3} {\mathrm e}^{8 i \left (d x +c \right )}+1575 b^{3} {\mathrm e}^{8 i \left (d x +c \right )}\right )}{105 d \,a^{4} \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{7}}+\frac {\sqrt {-a \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i \sqrt {-a \left (a +b \right )}-2 a -b}{b}\right )}{2 a^{2} d}+\frac {3 \sqrt {-a \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i \sqrt {-a \left (a +b \right )}-2 a -b}{b}\right ) b}{2 a^{3} d}+\frac {3 \sqrt {-a \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i \sqrt {-a \left (a +b \right )}-2 a -b}{b}\right ) b^{2}}{2 a^{4} d}+\frac {\sqrt {-a \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i \sqrt {-a \left (a +b \right )}-2 a -b}{b}\right ) b^{3}}{2 a^{5} d}-\frac {\sqrt {-a \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {2 i \sqrt {-a \left (a +b \right )}+2 a +b}{b}\right )}{2 a^{2} d}-\frac {3 \sqrt {-a \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {2 i \sqrt {-a \left (a +b \right )}+2 a +b}{b}\right ) b}{2 a^{3} d}-\frac {3 \sqrt {-a \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {2 i \sqrt {-a \left (a +b \right )}+2 a +b}{b}\right ) b^{2}}{2 a^{4} d}-\frac {\sqrt {-a \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {2 i \sqrt {-a \left (a +b \right )}+2 a +b}{b}\right ) b^{3}}{2 a^{5} d}\) | \(797\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.52, size = 154, normalized size = 1.32 \begin {gather*} \frac {\frac {105 \, {\left (a^{4} + 4 \, a^{3} b + 6 \, a^{2} b^{2} + 4 \, a b^{3} + b^{4}\right )} \arctan \left (\frac {{\left (a + b\right )} \tan \left (d x + c\right )}{\sqrt {{\left (a + b\right )} a}}\right )}{\sqrt {{\left (a + b\right )} a} a^{4}} + \frac {105 \, {\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \tan \left (d x + c\right )^{6} - 35 \, {\left (a^{3} + 2 \, a^{2} b + a b^{2}\right )} \tan \left (d x + c\right )^{4} - 15 \, a^{3} + 21 \, {\left (a^{3} + a^{2} b\right )} \tan \left (d x + c\right )^{2}}{a^{4} \tan \left (d x + c\right )^{7}}}{105 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 367 vs.
\(2 (103) = 206\).
time = 0.50, size = 834, normalized size = 7.13 \begin {gather*} \left [\frac {4 \, {\left (176 \, a^{3} + 406 \, a^{2} b + 350 \, a b^{2} + 105 \, b^{3}\right )} \cos \left (d x + c\right )^{7} - 28 \, {\left (58 \, a^{3} + 158 \, a^{2} b + 145 \, a b^{2} + 45 \, b^{3}\right )} \cos \left (d x + c\right )^{5} + 140 \, {\left (10 \, a^{3} + 29 \, a^{2} b + 28 \, a b^{2} + 9 \, b^{3}\right )} \cos \left (d x + c\right )^{3} + 105 \, {\left ({\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \cos \left (d x + c\right )^{6} - 3 \, {\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \cos \left (d x + c\right )^{4} - a^{3} - 3 \, a^{2} b - 3 \, a b^{2} - b^{3} + 3 \, {\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \sqrt {-\frac {a + b}{a}} \log \left (\frac {{\left (8 \, a^{2} + 8 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{4} - 2 \, {\left (4 \, a^{2} + 5 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{2} - 4 \, {\left ({\left (2 \, a^{2} + a b\right )} \cos \left (d x + c\right )^{3} - {\left (a^{2} + a b\right )} \cos \left (d x + c\right )\right )} \sqrt {-\frac {a + b}{a}} \sin \left (d x + c\right ) + a^{2} + 2 \, a b + b^{2}}{b^{2} \cos \left (d x + c\right )^{4} - 2 \, {\left (a b + b^{2}\right )} \cos \left (d x + c\right )^{2} + a^{2} + 2 \, a b + b^{2}}\right ) \sin \left (d x + c\right ) - 420 \, {\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \cos \left (d x + c\right )}{420 \, {\left (a^{4} d \cos \left (d x + c\right )^{6} - 3 \, a^{4} d \cos \left (d x + c\right )^{4} + 3 \, a^{4} d \cos \left (d x + c\right )^{2} - a^{4} d\right )} \sin \left (d x + c\right )}, \frac {2 \, {\left (176 \, a^{3} + 406 \, a^{2} b + 350 \, a b^{2} + 105 \, b^{3}\right )} \cos \left (d x + c\right )^{7} - 14 \, {\left (58 \, a^{3} + 158 \, a^{2} b + 145 \, a b^{2} + 45 \, b^{3}\right )} \cos \left (d x + c\right )^{5} + 70 \, {\left (10 \, a^{3} + 29 \, a^{2} b + 28 \, a b^{2} + 9 \, b^{3}\right )} \cos \left (d x + c\right )^{3} - 105 \, {\left ({\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \cos \left (d x + c\right )^{6} - 3 \, {\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \cos \left (d x + c\right )^{4} - a^{3} - 3 \, a^{2} b - 3 \, a b^{2} - b^{3} + 3 \, {\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \sqrt {\frac {a + b}{a}} \arctan \left (\frac {{\left ({\left (2 \, a + b\right )} \cos \left (d x + c\right )^{2} - a - b\right )} \sqrt {\frac {a + b}{a}}}{2 \, {\left (a + b\right )} \cos \left (d x + c\right ) \sin \left (d x + c\right )}\right ) \sin \left (d x + c\right ) - 210 \, {\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \cos \left (d x + c\right )}{210 \, {\left (a^{4} d \cos \left (d x + c\right )^{6} - 3 \, a^{4} d \cos \left (d x + c\right )^{4} + 3 \, a^{4} d \cos \left (d x + c\right )^{2} - a^{4} d\right )} \sin \left (d x + c\right )}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 238 vs.
\(2 (103) = 206\).
time = 0.52, size = 238, normalized size = 2.03 \begin {gather*} \frac {\frac {105 \, {\left (a^{4} + 4 \, a^{3} b + 6 \, a^{2} b^{2} + 4 \, a b^{3} + b^{4}\right )} {\left (\pi \left \lfloor \frac {d x + c}{\pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (2 \, a + 2 \, b\right ) + \arctan \left (\frac {a \tan \left (d x + c\right ) + b \tan \left (d x + c\right )}{\sqrt {a^{2} + a b}}\right )\right )}}{\sqrt {a^{2} + a b} a^{4}} + \frac {105 \, a^{3} \tan \left (d x + c\right )^{6} + 315 \, a^{2} b \tan \left (d x + c\right )^{6} + 315 \, a b^{2} \tan \left (d x + c\right )^{6} + 105 \, b^{3} \tan \left (d x + c\right )^{6} - 35 \, a^{3} \tan \left (d x + c\right )^{4} - 70 \, a^{2} b \tan \left (d x + c\right )^{4} - 35 \, a b^{2} \tan \left (d x + c\right )^{4} + 21 \, a^{3} \tan \left (d x + c\right )^{2} + 21 \, a^{2} b \tan \left (d x + c\right )^{2} - 15 \, a^{3}}{a^{4} \tan \left (d x + c\right )^{7}}}{105 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 18.91, size = 100, normalized size = 0.85 \begin {gather*} \frac {\mathrm {atan}\left (\frac {\mathrm {tan}\left (c+d\,x\right )\,\sqrt {a+b}}{\sqrt {a}}\right )\,{\left (a+b\right )}^{7/2}}{a^{9/2}\,d}-\frac {\frac {1}{7\,a}-\frac {{\mathrm {tan}\left (c+d\,x\right )}^2\,\left (a+b\right )}{5\,a^2}+\frac {{\mathrm {tan}\left (c+d\,x\right )}^4\,{\left (a+b\right )}^2}{3\,a^3}-\frac {{\mathrm {tan}\left (c+d\,x\right )}^6\,{\left (a+b\right )}^3}{a^4}}{d\,{\mathrm {tan}\left (c+d\,x\right )}^7} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________